package com.neu.neumall.product;

import com.neu.neumall.product.controller.BrandController;
import com.neu.neumall.product.service.BrandService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 1.整合MyBatis-Plus
 *      1)、导入依赖
 *      2）、配置
 *          1、配置数据源
 *              1）、导入数据库的驱动
 *              2）、application.yml里配置数据源
 *          2、配置Mybatis-Plus
 *              1)使用@MapperScan
 *              2)application.yml里配置映射文件
 *2.逻辑删除
 * 1）配置全局逻辑删除规则（mybatisplus版本大于3.1，所以可以省略）
 * 2）配置逻辑删除的组件Bean（mybatisplus版本大于3.1，所以省略）
 * 3）给Bean加上逻辑删除注解@TableLogic
 *
 */
@EnableRedisHttpSession
@EnableFeignClients(basePackages = "com.neu.neumall.product.feign")
@MapperScan("com.neu.neumall.product.dao")
@SpringBootApplication
@EnableDiscoveryClient
public class NeumallProductApplication {

    private BrandService brandService;
    public static void main(String[] args) {
        SpringApplication.run(NeumallProductApplication.class, args);
    }

}
